package com.platform.module.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.platform.common.annotation.Excel;
import com.platform.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 厂商信息管理对象 base_factory
 * 
 * @author 王琦
 * @date 2020-06-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("base_factory")
public class BaseFactory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 厂商id */
    @TableId(type = IdType.AUTO)
    private Long factoryId;

    /** 厂商名称 */
    @NotBlank(message = "厂商名称不能为空")
    @Excel(name = "厂商名称")
    private String factoryName;

    /** 厂商代码 */
    @NotBlank(message = "厂商代码不能为空")
    @Excel(name = "厂商代码")
    private String factoryCode;

    /** 厂商地址 */
    @Excel(name = "厂商地址")
    private String factoryAddress;

    /** 厂商网址 */
    @Excel(name = "厂商网址")
    @Pattern(regexp = "/^((https|http|ftp|rtsp|mms){0,1}(:\\/\\/){0,1})www\\.(([A-Za-z0-9-~]+)\\.)+([A-Za-z0-9-~\\/])+$/",message = "厂商网址不正确")
    private String factoryWebsite;

    /** 厂商电话 */
    @Excel(name = "厂商电话")
    private String factoryPhone;

    /** 邮政编码 */
    @Excel(name = "邮政编码")
    private String factoryPostal;

    /** 电子邮件 */
    @Excel(name = "电子邮件")
    @Email(message = "邮箱格式不正确")
    private String factoryEmail;

    /** 联系人 */
    @Excel(name = "联系人")
    private String factoryLiaison;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String factoryContact;

    /** 设备采集代号 */
    @Excel(name = "设备采集代号")
    private String factoryNumber;

    /** 删除标志（0正常1删除） */
    @TableLogic
    private String delFlag;

    /** 备注 */
    private String remark;

}
